home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Language/OS - Multiplatform Resource Library
/
LANGUAGE OS.iso
/
t3_1
/
risc_src.lha
/
risc_sources
/
xlib
/
xws8.t
< prev
next >
Wrap
Text File
|
1990-06-01
|
13KB
|
290 lines
(HERALD XWS8 (ENV TSYS (XLIB INTERFACE)))
(DEFINE-FOREIGN XSELECTINPUT*
("XSelectInput" (IN REP/C-POINTER)
(IN REP/INTEGER)
(IN REP/INTEGER))
IGNORE)
(DEFINE (XSELECTINPUT DPY W MASK)
(LET* ((DPY (CHK-DISPLAYP DPY))
(W W)
(MASK MASK)
(RETURN-VALUE (BLOCK (XSELECTINPUT* DPY W MASK) '())))
RETURN-VALUE))
(DEFINE-FOREIGN XFLUSH* ("XFlush" (IN REP/C-POINTER)) IGNORE)
(DEFINE (XFLUSH DPY)
(LET* ((DPY (CHK-DISPLAYP DPY))
(RETURN-VALUE (BLOCK (XFLUSH* DPY) '())))
RETURN-VALUE))
(DEFINE-FOREIGN XSYNC* ("XSync" (IN REP/C-POINTER) (IN REP/INTEGER)) IGNORE)
(DEFINE (XSYNC DPY DISCARD)
(LET* ((DPY (CHK-DISPLAYP DPY))
(DISCARD DISCARD)
(RETURN-VALUE (BLOCK (XSYNC* DPY DISCARD) '())))
RETURN-VALUE))
(DEFINE-FOREIGN XEVENTSQUEUED*
("XEventsQueued" (IN REP/C-POINTER) (IN REP/INTEGER))
REP/INTEGER)
(DEFINE (XEVENTSQUEUED DPY MODE)
(LET* ((DPY (CHK-DISPLAYP DPY))
(MODE MODE)
(RETURN-VALUE (XEVENTSQUEUED* DPY MODE)))
RETURN-VALUE))
(DEFINE-FOREIGN XPENDING* ("XPending" (IN REP/C-POINTER)) REP/INTEGER)
(DEFINE (XPENDING DPY)
(LET* ((DPY (CHK-DISPLAYP DPY)) (RETURN-VALUE (XPENDING* DPY)))
RETURN-VALUE))
(DEFINE-FOREIGN XNEXTEVENT*
("XNextEvent" (IN REP/C-POINTER) (IN REP/EXTEND))
IGNORE)
(DEFINE (XNEXTEVENT DPY)
(LET* ((DPY (CHK-DISPLAYP DPY))
(EVENT (MAKE-BYTEV 96))
(RETURN-VALUE (BLOCK (XNEXTEVENT* DPY EVENT) '())))
(CONS 'XEVENTP EVENT)))
(DEFINE-FOREIGN XPEEKEVENT*
("XPeekEvent" (IN REP/C-POINTER) (IN REP/EXTEND))
IGNORE)
(DEFINE (XPEEKEVENT DPY)
(LET* ((DPY (CHK-DISPLAYP DPY))
(EVENT (MAKE-BYTEV 96))
(RETURN-VALUE (BLOCK (XPEEKEVENT* DPY EVENT) '())))
(CONS 'XEVENTP EVENT)))
(DEFINE-FOREIGN XIFEVENT*
("XIfEvent" (IN REP/C-POINTER)
(IN REP/EXTEND)
(IN REP/EXTEND)
(IN REP/C-POINTER))
IGNORE)
(DEFINE (XIFEVENT DPY PREDICATE ARG)
(LET* ((DPY (CHK-DISPLAYP DPY))
(EVENT (MAKE-BYTEV 96))
(PREDICATE PREDICATE)
(ARG (CHK-CHARP ARG))
(RETURN-VALUE (BLOCK (XIFEVENT* DPY EVENT PREDICATE ARG)
'())))
(CONS 'XEVENTP EVENT)))
(DEFINE-FOREIGN XCHECKIFEVENT*
("XCheckIfEvent" (IN REP/C-POINTER)
(IN REP/EXTEND)
(IN REP/EXTEND)
(IN REP/C-POINTER))
REP/INTEGER)
(DEFINE (XCHECKIFEVENT DPY PREDICATE ARG)
(LET* ((DPY (CHK-DISPLAYP DPY))
(EVENT (MAKE-BYTEV 96))
(PREDICATE PREDICATE)
(ARG (CHK-CHARP ARG))
(RETURN-VALUE (XCHECKIFEVENT* DPY EVENT PREDICATE ARG)))
(RETURN RETURN-VALUE (CONS 'XEVENTP EVENT))))
(DEFINE-FOREIGN XPEEKIFEVENT*
("XPeekIfEvent" (IN REP/C-POINTER)
(IN REP/EXTEND)
(IN REP/EXTEND)
(IN REP/C-POINTER))
IGNORE)
(DEFINE (XPEEKIFEVENT DPY PREDICATE ARG)
(LET* ((DPY (CHK-DISPLAYP DPY))
(EVENT (MAKE-BYTEV 96))
(PREDICATE PREDICATE)
(ARG (CHK-CHARP ARG))
(RETURN-VALUE (BLOCK (XPEEKIFEVENT* DPY EVENT PREDICATE ARG)
'())))
(CONS 'XEVENTP EVENT)))
(DEFINE-FOREIGN XWINDOWEVENT*
("XWindowEvent" (IN REP/C-POINTER)
(IN REP/INTEGER)
(IN REP/INTEGER)
(IN REP/EXTEND))
IGNORE)
(DEFINE (XWINDOWEVENT DPY W MASK)
(LET* ((DPY (CHK-DISPLAYP DPY))
(W W)
(MASK MASK)
(EVENT (MAKE-BYTEV 96))
(RETURN-VALUE (BLOCK (XWINDOWEVENT* DPY W MASK EVENT) '())))
(CONS 'XEVENTP EVENT)))
(DEFINE-FOREIGN XCHECKWINDOWEVENT*
("XCheckWindowEvent" (IN REP/C-POINTER)
(IN REP/INTEGER)
(IN REP/INTEGER)
(IN REP/EXTEND))
REP/INTEGER)
(DEFINE (XCHECKWINDOWEVENT DPY W MASK)
(LET* ((DPY (CHK-DISPLAYP DPY))
(W W)
(MASK MASK)
(EVENT (MAKE-BYTEV 96))
(RETURN-VALUE (XCHECKWINDOWEVENT* DPY W MASK EVENT)))
(RETURN RETURN-VALUE (CONS 'XEVENTP EVENT))))
(DEFINE-FOREIGN XMASKEVENT*
("XMaskEvent" (IN REP/C-POINTER)
(IN REP/INTEGER)
(IN REP/EXTEND))
IGNORE)
(DEFINE (XMASKEVENT DPY MASK)
(LET* ((DPY (CHK-DISPLAYP DPY))
(MASK MASK)
(EVENT (MAKE-BYTEV 96))
(RETURN-VALUE (BLOCK (XMASKEVENT* DPY MASK EVENT) '())))
(CONS 'XEVENTP EVENT)))
(DEFINE-FOREIGN XCHECKMASKEVENT*
("XCheckMaskEvent" (IN REP/C-POINTER)
(IN REP/INTEGER)
(IN REP/EXTEND))
REP/INTEGER)
(DEFINE (XCHECKMASKEVENT DPY MASK)
(LET* ((DPY (CHK-DISPLAYP DPY))
(MASK MASK)
(EVENT (MAKE-BYTEV 96))
(RETURN-VALUE (XCHECKMASKEVENT* DPY MASK EVENT)))
(RETURN RETURN-VALUE (CONS 'XEVENTP EVENT))))
(DEFINE-FOREIGN XCHECKTYPEDEVENT*
("XCheckTypedEvent" (IN REP/C-POINTER)
(IN REP/INTEGER)
(IN REP/EXTEND))
REP/INTEGER)
(DEFINE (XCHECKTYPEDEVENT DPY TYPE)
(LET* ((DPY (CHK-DISPLAYP DPY))
(TYPE TYPE)
(EVENT (MAKE-BYTEV 96))
(RETURN-VALUE (XCHECKTYPEDEVENT* DPY TYPE EVENT)))
(RETURN RETURN-VALUE (CONS 'XEVENTP EVENT))))
(DEFINE-FOREIGN XCHECKTYPEDWINDOWEVENT*
("XCheckTypedWindowEvent" (IN REP/C-POINTER)
(IN REP/INTEGER)
(IN REP/INTEGER)
(IN REP/EXTEND))
REP/INTEGER)
(DEFINE (XCHECKTYPEDWINDOWEVENT DPY W TYPE)
(LET* ((DPY (CHK-DISPLAYP DPY))
(W W)
(TYPE TYPE)
(EVENT (MAKE-BYTEV 96))
(RETURN-VALUE (XCHECKTYPEDWINDOWEVENT* DPY W TYPE EVENT)))
(RETURN RETURN-VALUE (CONS 'XEVENTP EVENT))))
(DEFINE-FOREIGN XPUTBACKEVENT*
("XPutBackEvent" (IN REP/C-POINTER) (IN REP/C-POINTER))
IGNORE)
(DEFINE (XPUTBACKEVENT DPY EVENT)
(LET* ((DPY (CHK-DISPLAYP DPY))
(EVENT (CHK-XEVENTP EVENT))
(RETURN-VALUE (BLOCK (XPUTBACKEVENT* DPY EVENT) '())))
RETURN-VALUE))
(DEFINE-FOREIGN XSENDEVENT*
("XSendEvent" (IN REP/C-POINTER)
(IN REP/INTEGER)
(IN REP/INTEGER)
(IN REP/INTEGER)
(IN REP/C-POINTER))
REP/INTEGER)
(DEFINE (XSENDEVENT DPY W PROPAGATE EVENT_MASK EVENT)
(LET* ((DPY (CHK-DISPLAYP DPY))
(W W)
(PROPAGATE PROPAGATE)
(EVENT_MASK EVENT_MASK)
(EVENT (CHK-XEVENTP EVENT))
(RETURN-VALUE (XSENDEVENT* DPY W PROPAGATE EVENT_MASK EVENT)))
RETURN-VALUE))
(DEFINE-FOREIGN XDISPLAYMOTIONBUFFERSIZE*
("XDisplayMotionBufferSize" (IN REP/C-POINTER))
REP/INTEGER)
(DEFINE (XDISPLAYMOTIONBUFFERSIZE DPY)
(LET* ((DPY (CHK-DISPLAYP DPY))
(RETURN-VALUE (XDISPLAYMOTIONBUFFERSIZE* DPY)))
RETURN-VALUE))
(DEFINE-FOREIGN XGETMOTIONEVENTS*
("XGetMotionEvents" (IN REP/C-POINTER)
(IN REP/INTEGER)
(IN REP/INTEGER)
(IN REP/INTEGER)
(IN REP/EXTEND))
REP/POINTER)
(DEFINE (XGETMOTIONEVENTS DPY W START STOP)
(LET* ((DPY (CHK-DISPLAYP DPY))
(W W)
(START START)
(STOP STOP)
(NEVENTS (MAKE-BYTEV 4))
(RETURN-VALUE (CONS 'XTIMECOORDAP
(XGETMOTIONEVENTS* DPY W START STOP NEVENTS))))
(RETURN RETURN-VALUE (MREF-INTEGER NEVENTS 0))))
(DEFINE-FOREIGN XSETAFTERFUNCTION*
("XSetAfterFunction" (IN REP/C-POINTER) (IN REP/EXTEND))
REP/POINTER)
(DEFINE (XSETAFTERFUNCTION DPY FUNC)
(LET* ((DPY (CHK-DISPLAYP DPY))
(FUNC FUNC)
(RETURN-VALUE (XSETAFTERFUNCTION* DPY FUNC)))
RETURN-VALUE))
(DEFINE-FOREIGN XSYNCHRONIZE*
("XSynchronize" (IN REP/C-POINTER) (IN REP/INTEGER))
REP/POINTER)
(DEFINE (XSYNCHRONIZE DPY ONOFF)
(LET* ((DPY (CHK-DISPLAYP DPY))
(ONOFF ONOFF)
(RETURN-VALUE (XSYNCHRONIZE* DPY ONOFF)))
RETURN-VALUE))
(DEFINE-FOREIGN XSETERRORHANDLER* ("XSetErrorHandler" (IN REP/EXTEND)) IGNORE)
(DEFINE (XSETERRORHANDLER HANDLER)
(LET* ((HANDLER HANDLER)
(RETURN-VALUE (BLOCK (XSETERRORHANDLER* HANDLER) '())))
RETURN-VALUE))
(DEFINE-FOREIGN XGETERRORTEXT*
("XGetErrorText" (IN REP/C-POINTER)
(IN REP/INTEGER)
(IN REP/EXTEND)
(IN REP/INTEGER))
IGNORE)
(DEFINE (XGETERRORTEXT DPY CODE NBYTES)
(LET* ((DPY (CHK-DISPLAYP DPY))
(CODE CODE)
(BUFFER (MAKE-BYTEV 1))
(NBYTES NBYTES)
(RETURN-VALUE (BLOCK (XGETERRORTEXT* DPY CODE BUFFER NBYTES)
'())))
(MREF-8-U BUFFER 0)))
(DEFINE-FOREIGN XGETERRORDATABASETEXT*
("XGetErrorDatabaseText" (IN REP/C-POINTER)
(IN REP/STRING)
(IN REP/STRING)
(IN REP/STRING)
(IN REP/EXTEND)
(IN REP/INTEGER))
IGNORE)
(DEFINE (XGETERRORDATABASETEXT DPY NAME TYPE DEFAULTP NBYTES)
(LET* ((DPY (CHK-DISPLAYP DPY))
(NAME (IF (STRING? NAME)
(STRING->ASCIZ! NAME)
(ERROR "Argument is incorrect type: ~s" NAME)))
(TYPE (IF (STRING? TYPE)
(STRING->ASCIZ! TYPE)
(ERROR "Argument is incorrect type: ~s" TYPE)))
(DEFAULTP (IF (STRING? DEFAULTP)
(STRING->ASCIZ! DEFAULTP)
(ERROR "Argument is incorrect type: ~s" DEFAULTP)))
(BUFFER (MAKE-BYTEV 1))
(NBYTES NBYTES)
(RETURN-VALUE (BLOCK (XGETERRORDATABASETEXT* DPY
NAME
TYPE
DEFAULTP
BUFFER
NBYTES)
'())))
(MREF-8-U BUFFER 0)))
(DEFINE-FOREIGN XDISPLAYNAME* ("XDisplayName" (IN REP/STRING)) REP/POINTER)
(DEFINE (XDISPLAYNAME DISPLAY)
(LET* ((DISPLAY (IF (STRING? DISPLAY)
(STRING->ASCIZ! DISPLAY)
(ERROR "Argument is incorrect type: ~s" DISPLAY)))
(RETURN-VALUE (ASCIZ->STRING (XDISPLAYNAME* DISPLAY))))
RETURN-VALUE))
(DEFINE-FOREIGN XSETIOERRORHANDLER*
("XSetIOErrorHandler" (IN REP/EXTEND))
IGNORE)
(DEFINE (XSETIOERRORHANDLER HANDLER)
(LET* ((HANDLER HANDLER)
(RETURN-VALUE (BLOCK (XSETIOERRORHANDLER* HANDLER) '())))
RETURN-VALUE))